package com.tfy.liquor.bean;

import lombok.Data;

import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * 钱包流水记录
 */
@Data
public class UserPriseRecords {
    private Long id; // 编号
    private Long userId; // 用户编号
    private BigDecimal amount; // 变动金额
    private BigDecimal afterAmount; // 变动后金额
    private String orderId; // 订单编号
    private String type; // 类型
    private Timestamp createTime; // 创建时间
    private String remark; // 备注

    public UserPriseRecords() { }

    public UserPriseRecords(Long userId, BigDecimal amount, BigDecimal afterAmount, String orderId) {
        this.userId = userId;
        this.amount = amount;
        this.afterAmount = afterAmount;
        this.orderId = orderId;
    }

    public void setAmount(String amount) {
        this.amount = new BigDecimal(amount);
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public void setAfterAmount(String afterAmount) {
        this.afterAmount = new BigDecimal(afterAmount);
    }

    public void setAfterAmount(BigDecimal afterAmount) {
        this.afterAmount = afterAmount;
    }
}
